<!--
*Author：COCO
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/qualitytests/quality_manage/Quality_TestProject.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/qualitytests/quality_manage/Quality_TestProject.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'QualityTestProjectId',
                footer: "Foots",
                cnName: '质检项目表',
                name: 'quality_manage/Quality_TestProject',
                url: "/Quality_TestProject/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({"QualityTestProjectName":"","QualityTestProjectCode":"","QualityTestTool":"","QualityTestMethodName":"","QualityTestTypeName":"","StandardValueName":"","QualityTestProjectTera":""});
            const editFormOptions = ref([[{"title":"质检项目名称","required":true,"field":"QualityTestProjectName"}],
                              [{"title":"质检项目编码","field":"QualityTestProjectCode"}],
                              [{"title":"质检工具","required":true,"field":"QualityTestTool"}],
                              [{"dataKey":"QualityTestMethod","data":[],"title":"质检方法","required":true,"field":"QualityTestMethodName","type":"select"}],
                              [{"dataKey":"QualityTestType","data":[],"title":"质检类型","required":true,"field":"QualityTestTypeName","type":"select"}],
                              [{"dataKey":"StandardValue","data":[],"title":"标准值","required":true,"field":"StandardValueName","type":"select"}],
                              [{"title":"备注","field":"QualityTestProjectTera","type":"textarea"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'QualityTestProjectId',title:'质检项目主键Id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'QualityTestPlanId',title:'质检方案Id',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'QualityTestProjectName',title:'质检项目名称',type:'string',width:120,require:true,align:'left',sort:true},
                       {field:'QualityTestProjectCode',title:'质检项目编码',type:'string',width:120,align:'left'},
                       {field:'QualityTestTool',title:'质检工具',type:'string',width:120,require:true,align:'left'},
                       {field:'QualityTestMethodName',title:'质检方法',type:'string',bind:{ key:'QualityTestMethod',data:[]},width:180,require:true,align:'left'},
                       {field:'QualityTestTypeName',title:'质检类型',type:'string',bind:{ key:'QualityTestType',data:[]},width:180,require:true,align:'left'},
                       {field:'StandardValueName',title:'标准值',type:'string',bind:{ key:'StandardValue',data:[]},width:180,require:true,align:'left'},
                       {field:'QualityTestProjectTera',title:'备注',type:'string',width:120,align:'left'},
                       {field:'CreateID',title:'创建人ID',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:130,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:110,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人ID',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人',type:'string',width:130,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:110,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
